package com.ruoyi.system.service.impl;

import com.ruoyi.common.core.domain.entity.RestaurantOrder;
import com.ruoyi.system.mapper.RestaurantOrderMapper;
import com.ruoyi.system.service.RestaurantOrderService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author：liyouxin
 * @date：2023/8/15 13:13
 */
@Service
public class RestaurantOrderServiceImpl implements RestaurantOrderService {

	@Resource
	private RestaurantOrderMapper restaurantOrderMapper;

	@Override
	public List<RestaurantOrder> getNormalOrder() {
		//restaurantGoodsMapper.selectRestaurantGoodsList();
		return null;
	}

	@Override
	public List<RestaurantOrder> getNormalOrderList(RestaurantOrder restaurantOrder) {
		return restaurantOrderMapper.selectList(restaurantOrder);
	}

	@Override
	public List<RestaurantOrder> getOnGoingNormalOrderList(RestaurantOrder restaurantOrder) {
		return restaurantOrderMapper.selectOnGoingList(restaurantOrder);
	}

	@Override
	public RestaurantOrder selectNormalOrderById(Long id) {
		return restaurantOrderMapper.selectById(id);
	}

	@Override
	public Boolean createNormalOrder(RestaurantOrder restaurantOrder) {
		return restaurantOrderMapper.insert(restaurantOrder) == 1;
	}

	@Override
	public Boolean updateNormalOrder(RestaurantOrder restaurantOrder) {
		return restaurantOrderMapper.update(restaurantOrder)==1;
	}

	@Override
	public Boolean deleteNormalOrderById(Long id) {
		return restaurantOrderMapper.deleteById(id)==1;
	}

	@Override
	public List<RestaurantOrder> getBuffetOrder() {
		return null;
	}
}
